<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.X86.Regs</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-4"></span><span>        </span><span class="hs-comment">-- squeese functions for the graph allocator</span><span>
</span><span id="line-5"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#virtualRegSqueeze"><span class="hs-identifier">virtualRegSqueeze</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#realRegSqueeze"><span class="hs-identifier">realRegSqueeze</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span>        </span><span class="hs-comment">-- immediates</span><span>
</span><span id="line-9"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier">Imm</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#strImmLit"><span class="hs-identifier">strImmLit</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier">litToImm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span>        </span><span class="hs-comment">-- addressing modes</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrMode"><span class="hs-identifier">AddrMode</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#addrOffset"><span class="hs-identifier">addrOffset</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>        </span><span class="hs-comment">-- registers</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#spRel"><span class="hs-identifier">spRel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#argRegs"><span class="hs-identifier">argRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allArgRegs"><span class="hs-identifier">allArgRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allIntArgRegs"><span class="hs-identifier">allIntArgRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#callClobberedRegs"><span class="hs-identifier">callClobberedRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#instrClobberedRegs"><span class="hs-identifier">instrClobberedRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allMachRegNos"><span class="hs-identifier">allMachRegNos</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#classOfRealReg"><span class="hs-identifier">classOfRealReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#showReg"><span class="hs-identifier">showReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>        </span><span class="hs-comment">-- machine specific</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EABase"><span class="hs-identifier">EABase</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EAIndex"><span class="hs-identifier">EAIndex</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#addrModeRegs"><span class="hs-identifier">addrModeRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#eax"><span class="hs-identifier">eax</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ebx"><span class="hs-identifier">ebx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ecx"><span class="hs-identifier">ecx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#edx"><span class="hs-identifier">edx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#esi"><span class="hs-identifier">esi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#edi"><span class="hs-identifier">edi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ebp"><span class="hs-identifier">ebp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#esp"><span class="hs-identifier">esp</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rax"><span class="hs-identifier">rax</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rbx"><span class="hs-identifier">rbx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier">rcx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier">rdx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rsi"><span class="hs-identifier">rsi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rdi"><span class="hs-identifier">rdi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rbp"><span class="hs-identifier">rbp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rsp"><span class="hs-identifier">rsp</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r8"><span class="hs-identifier">r8</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r9"><span class="hs-identifier">r9</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r10"><span class="hs-identifier">r10</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r11"><span class="hs-identifier">r11</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r12"><span class="hs-identifier">r12</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r13"><span class="hs-identifier">r13</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r14"><span class="hs-identifier">r14</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r15"><span class="hs-identifier">r15</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#lastint"><span class="hs-identifier">lastint</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm0"><span class="hs-identifier">xmm0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm1"><span class="hs-identifier">xmm1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm2"><span class="hs-identifier">xmm2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm3"><span class="hs-identifier">xmm3</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm4"><span class="hs-identifier">xmm4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm5"><span class="hs-identifier">xmm5</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm6"><span class="hs-identifier">xmm6</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm7"><span class="hs-identifier">xmm7</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm8"><span class="hs-identifier">xmm8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm9"><span class="hs-identifier">xmm9</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm10"><span class="hs-identifier">xmm10</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm11"><span class="hs-identifier">xmm11</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm12"><span class="hs-identifier">xmm12</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm13"><span class="hs-identifier">xmm13</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm14"><span class="hs-identifier">xmm14</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm15"><span class="hs-identifier">xmm15</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm"><span class="hs-identifier">xmm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier">firstxmm</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#lastxmm"><span class="hs-identifier">lastxmm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ripRel"><span class="hs-identifier">ripRel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allFPArgRegs"><span class="hs-identifier">allFPArgRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allocatableRegs"><span class="hs-identifier">allocatableRegs</span></a></span><span>
</span><span id="line-46"></span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Regs.html"><span class="hs-identifier">GHC.Platform.Regs</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html"><span class="hs-identifier">GHC.Platform.Reg</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html"><span class="hs-identifier">GHC.Platform.Reg.Class</span></a></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>           </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier">CLabel</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.html#"><span class="hs-identifier">Data.Array</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">A</span></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">-- | regSqueeze_class reg</span><span>
</span><span id="line-66"></span><span class="hs-comment">--      Calculate the maximum number of register colors that could be</span><span>
</span><span id="line-67"></span><span class="hs-comment">--      denied to a node of this class due to having this reg</span><span>
</span><span id="line-68"></span><span class="hs-comment">--      as a neighbour.</span><span>
</span><span id="line-69"></span><span class="hs-comment">--</span><span>
</span><span id="line-70"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#virtualRegSqueeze"><span class="hs-pragma hs-type">virtualRegSqueeze</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-71"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#virtualRegSqueeze"><span class="hs-identifier hs-type">virtualRegSqueeze</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span id="virtualRegSqueeze"><span class="annot"><span class="annottext">virtualRegSqueeze :: RegClass -&gt; VirtualReg -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#virtualRegSqueeze"><span class="hs-identifier hs-var hs-var">virtualRegSqueeze</span></a></span></span><span> </span><span id="local-6989586621681004587"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681004587"><span class="hs-identifier hs-var">cls</span></a></span></span><span> </span><span id="local-6989586621681004586"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681004586"><span class="hs-identifier hs-var">vr</span></a></span></span><span>
</span><span id="line-74"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681004587"><span class="hs-identifier hs-var">cls</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-75"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-76"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681004586"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-77"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-78"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-79"></span><span>                </span><span id="local-6989586621681004582"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681004582"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>
</span><span id="line-82"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681004586"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-83"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-84"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-85"></span><span>                </span><span id="local-6989586621681004578"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681004578"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span>        </span><span id="local-6989586621681004577"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681004577"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#realRegSqueeze"><span class="hs-pragma hs-type">realRegSqueeze</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-91"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#realRegSqueeze"><span class="hs-identifier hs-type">realRegSqueeze</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-92"></span><span id="realRegSqueeze"><span class="annot"><span class="annottext">realRegSqueeze :: RegClass -&gt; RealReg -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#realRegSqueeze"><span class="hs-identifier hs-var hs-var">realRegSqueeze</span></a></span></span><span> </span><span id="local-6989586621681004576"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681004576"><span class="hs-identifier hs-var">cls</span></a></span></span><span> </span><span id="local-6989586621681004575"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681004575"><span class="hs-identifier hs-var">rr</span></a></span></span><span>
</span><span id="line-93"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681004576"><span class="hs-identifier hs-var">cls</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-94"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-95"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681004575"><span class="hs-identifier hs-var">rr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-96"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621681004573"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004573"><span class="hs-identifier hs-var">regNo</span></a></span></span><span>
</span><span id="line-97"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004573"><span class="hs-identifier hs-var">regNo</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-98"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>
</span><span id="line-103"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681004575"><span class="hs-identifier hs-var">rr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-104"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621681004570"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004570"><span class="hs-identifier hs-var">regNo</span></a></span></span><span>
</span><span id="line-105"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004570"><span class="hs-identifier hs-var">regNo</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-106"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>        </span><span id="local-6989586621681004569"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681004569"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- Immediates</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-keyword">data</span><span> </span><span id="Imm"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-var">Imm</span></a></span></span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ImmInt"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span></span><span>      </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmInteger"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmInteger"><span class="hs-identifier hs-var">ImmInteger</span></a></span></span><span>  </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>     </span><span class="hs-comment">-- Sigh.</span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmCLbl"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span></span><span>     </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>      </span><span class="hs-comment">-- AbstractC Label (with baggage)</span><span>
</span><span id="line-120"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmLit"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmLit"><span class="hs-identifier hs-var">ImmLit</span></a></span></span><span>      </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>        </span><span class="hs-comment">-- Simple string</span><span>
</span><span id="line-121"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmIndex"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmIndex"><span class="hs-identifier hs-var">ImmIndex</span></a></span></span><span>    </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-122"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmFloat"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmFloat"><span class="hs-identifier hs-var">ImmFloat</span></a></span></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span>
</span><span id="line-123"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmDouble"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmDouble"><span class="hs-identifier hs-var">ImmDouble</span></a></span></span><span>   </span><span class="annot"><a href="../../base/src/GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmConstantSum"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmConstantSum"><span class="hs-identifier hs-var">ImmConstantSum</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-125"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ImmConstantDiff"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmConstantDiff"><span class="hs-identifier hs-var">ImmConstantDiff</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#strImmLit"><span class="hs-identifier hs-type">strImmLit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-128"></span><span id="strImmLit"><span class="annot"><span class="annottext">strImmLit :: String -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#strImmLit"><span class="hs-identifier hs-var hs-var">strImmLit</span></a></span></span><span> </span><span id="local-6989586621681004559"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681004559"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmLit"><span class="hs-identifier hs-var">ImmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681004559"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-type">litToImm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-132"></span><span id="litToImm"><span class="annot"><span class="annottext">litToImm :: CmmLit -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-var hs-var">litToImm</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681004556"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681004556"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681004555"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681004555"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmInteger"><span class="hs-identifier hs-var">ImmInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681004555"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681004556"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>                </span><span class="hs-comment">-- narrow to the width: a CmmInt might be out of</span><span>
</span><span id="line-134"></span><span>                </span><span class="hs-comment">-- range, but we assume that ImmInteger only contains</span><span>
</span><span id="line-135"></span><span>                </span><span class="hs-comment">-- in-range values.  A signed value should be fine here.</span><span>
</span><span id="line-136"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmFloat"><span class="hs-identifier hs-type">CmmFloat</span></a></span><span> </span><span id="local-6989586621681004552"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681004552"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmFloat"><span class="hs-identifier hs-var">ImmFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681004552"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-137"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmFloat"><span class="hs-identifier hs-type">CmmFloat</span></a></span><span> </span><span id="local-6989586621681004550"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681004550"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmDouble"><span class="hs-identifier hs-var">ImmDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681004550"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-138"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-type">CmmLabel</span></a></span><span> </span><span id="local-6989586621681004547"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004547"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004547"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabelOff"><span class="hs-identifier hs-type">CmmLabelOff</span></a></span><span> </span><span id="local-6989586621681004545"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004545"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681004544"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004544"><span class="hs-identifier hs-var">off</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmIndex"><span class="hs-identifier hs-var">ImmIndex</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004545"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004544"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-140"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabelDiffOff"><span class="hs-identifier hs-type">CmmLabelDiffOff</span></a></span><span> </span><span id="local-6989586621681004542"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004542"><span class="hs-identifier hs-var">l1</span></a></span></span><span> </span><span id="local-6989586621681004541"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004541"><span class="hs-identifier hs-var">l2</span></a></span></span><span> </span><span id="local-6989586621681004540"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004540"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>                             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Imm -&gt; Imm -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmConstantSum"><span class="hs-identifier hs-var">ImmConstantSum</span></a></span><span>
</span><span id="line-142"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Imm -&gt; Imm -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmConstantDiff"><span class="hs-identifier hs-var">ImmConstantDiff</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004542"><span class="hs-identifier hs-var">l1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004541"><span class="hs-identifier hs-var">l2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004540"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Imm
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;X86.Regs.litToImm: no match&quot;</span></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="hs-comment">-- addressing modes ------------------------------------------------------------</span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span class="hs-keyword">data</span><span> </span><span id="AddrMode"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrMode"><span class="hs-identifier hs-var">AddrMode</span></a></span></span><span>
</span><span id="line-149"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="AddrBaseIndex"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EABase"><span class="hs-identifier hs-type">EABase</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EAIndex"><span class="hs-identifier hs-type">EAIndex</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Displacement"><span class="hs-identifier hs-type">Displacement</span></a></span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmAddr"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmAddr"><span class="hs-identifier hs-var">ImmAddr</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="hs-keyword">data</span><span> </span><span id="EABase"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EABase"><span class="hs-identifier hs-var">EABase</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span id="EABaseNone"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EABaseNone"><span class="hs-identifier hs-var">EABaseNone</span></a></span></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="EABaseReg"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EABaseReg"><span class="hs-identifier hs-var">EABaseReg</span></a></span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="EABaseRip"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EABaseRip"><span class="hs-identifier hs-var">EABaseRip</span></a></span></span><span>
</span><span id="line-153"></span><span class="hs-keyword">data</span><span> </span><span id="EAIndex"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EAIndex"><span class="hs-identifier hs-var">EAIndex</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="EAIndexNone"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EAIndexNone"><span class="hs-identifier hs-var">EAIndexNone</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="EAIndex"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EAIndex"><span class="hs-identifier hs-var">EAIndex</span></a></span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-154"></span><span class="hs-keyword">type</span><span> </span><span id="Displacement"><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Displacement"><span class="hs-identifier hs-var">Displacement</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#addrOffset"><span class="hs-identifier hs-type">addrOffset</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span>
</span><span id="line-158"></span><span id="addrOffset"><span class="annot"><span class="annottext">addrOffset :: AddrMode -&gt; Int -&gt; Maybe AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#addrOffset"><span class="hs-identifier hs-var hs-var">addrOffset</span></a></span></span><span> </span><span id="local-6989586621681004530"><span class="annot"><span class="annottext">AddrMode
</span><a href="#local-6989586621681004530"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621681004529"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004529"><span class="hs-identifier hs-var">off</span></a></span></span><span>
</span><span id="line-159"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">AddrMode
</span><a href="#local-6989586621681004530"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-160"></span><span>      </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmAddr"><span class="hs-identifier hs-type">ImmAddr</span></a></span><span> </span><span id="local-6989586621681004528"><span class="annot"><span class="annottext">Imm
</span><a href="#local-6989586621681004528"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681004527"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004527"><span class="hs-identifier hs-var">off0</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AddrMode -&gt; Maybe AddrMode
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Imm -&gt; Int -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmAddr"><span class="hs-identifier hs-var">ImmAddr</span></a></span><span> </span><span class="annot"><span class="annottext">Imm
</span><a href="#local-6989586621681004528"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004527"><span class="hs-identifier hs-var">off0</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004529"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span>      </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-type">AddrBaseIndex</span></a></span><span> </span><span id="local-6989586621681004525"><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004525"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621681004524"><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004524"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmInt"><span class="hs-identifier hs-type">ImmInt</span></a></span><span> </span><span id="local-6989586621681004523"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004523"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AddrMode -&gt; Maybe AddrMode
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EABase -&gt; EAIndex -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span><span> </span><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004525"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004524"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004523"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004529"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-163"></span><span>      </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-type">AddrBaseIndex</span></a></span><span> </span><span id="local-6989586621681004522"><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004522"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621681004521"><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004521"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmInteger"><span class="hs-identifier hs-type">ImmInteger</span></a></span><span> </span><span id="local-6989586621681004520"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681004520"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AddrMode -&gt; Maybe AddrMode
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EABase -&gt; EAIndex -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span><span> </span><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004522"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004521"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681004520"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004529"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span>      </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-type">AddrBaseIndex</span></a></span><span> </span><span id="local-6989586621681004519"><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004519"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621681004518"><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004518"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmCLbl"><span class="hs-identifier hs-type">ImmCLbl</span></a></span><span> </span><span id="local-6989586621681004517"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004517"><span class="hs-identifier hs-var">lbl</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-167"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AddrMode -&gt; Maybe AddrMode
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EABase -&gt; EAIndex -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span><span> </span><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004519"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004518"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmIndex"><span class="hs-identifier hs-var">ImmIndex</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004517"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004529"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span>      </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-type">AddrBaseIndex</span></a></span><span> </span><span id="local-6989586621681004516"><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004516"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621681004515"><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004515"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ImmIndex"><span class="hs-identifier hs-type">ImmIndex</span></a></span><span> </span><span id="local-6989586621681004514"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004514"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681004513"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004513"><span class="hs-identifier hs-var">ix</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AddrMode -&gt; Maybe AddrMode
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EABase -&gt; EAIndex -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span><span> </span><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004516"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004515"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmIndex"><span class="hs-identifier hs-var">ImmIndex</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681004514"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004513"><span class="hs-identifier hs-var">ix</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004529"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span>      </span><span class="annot"><span class="annottext">AddrMode
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe AddrMode
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-comment">-- in theory, shouldn't happen</span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span>
</span><span id="line-175"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#addrModeRegs"><span class="hs-identifier hs-type">addrModeRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-176"></span><span id="addrModeRegs"><span class="annot"><span class="annottext">addrModeRegs :: AddrMode -&gt; [Reg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#addrModeRegs"><span class="hs-identifier hs-var hs-var">addrModeRegs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-type">AddrBaseIndex</span></a></span><span> </span><span id="local-6989586621681004512"><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004512"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621681004511"><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004511"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="annot"><span class="annottext">Imm
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681004510"><span class="hs-identifier hs-var">b_regs</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; [Reg] -&gt; [Reg]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681004509"><span class="hs-identifier hs-var">i_regs</span></a></span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-178"></span><span>   </span><span id="local-6989586621681004510"><span class="annot"><span class="annottext">b_regs :: [Reg]
</span><a href="#local-6989586621681004510"><span class="hs-identifier hs-var hs-var">b_regs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">EABase
</span><a href="#local-6989586621681004512"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EABaseReg"><span class="hs-identifier hs-type">EABaseReg</span></a></span><span> </span><span id="local-6989586621681004508"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681004508"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681004508"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">]</span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">EABase
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-179"></span><span>   </span><span id="local-6989586621681004509"><span class="annot"><span class="annottext">i_regs :: [Reg]
</span><a href="#local-6989586621681004509"><span class="hs-identifier hs-var hs-var">i_regs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="#local-6989586621681004511"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#EAIndex"><span class="hs-identifier hs-type">EAIndex</span></a></span><span> </span><span id="local-6989586621681004507"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681004507"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681004507"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">]</span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-180"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#addrModeRegs"><span class="hs-identifier hs-var">addrModeRegs</span></a></span><span> </span><span class="annot"><span class="annottext">AddrMode
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="hs-comment">-- registers -------------------------------------------------------------------</span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span class="hs-comment">-- @spRel@ gives us a stack relative addressing mode for volatile</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- temporaries and for excess call arguments.  @fpRel@, where</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- applicable, is the same but for the frame pointer.</span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#spRel"><span class="hs-identifier hs-type">spRel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-191"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-comment">-- ^ desired stack offset in bytes, positive or negative</span><span>
</span><span id="line-192"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span>
</span><span id="line-193"></span><span id="spRel"><span class="annot"><span class="annottext">spRel :: Platform -&gt; Int -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#spRel"><span class="hs-identifier hs-var hs-var">spRel</span></a></span></span><span> </span><span id="local-6989586621681004506"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004506"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681004505"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004505"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-194"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#target32Bit"><span class="hs-identifier hs-var">target32Bit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004506"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EABase -&gt; EAIndex -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; EABase
</span><a href="GHC.CmmToAsm.X86.Regs.html#EABaseReg"><span class="hs-identifier hs-var">EABaseReg</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#esp"><span class="hs-identifier hs-var">esp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="GHC.CmmToAsm.X86.Regs.html#EAIndexNone"><span class="hs-identifier hs-var">EAIndexNone</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004505"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-197"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EABase -&gt; EAIndex -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; EABase
</span><a href="GHC.CmmToAsm.X86.Regs.html#EABaseReg"><span class="hs-identifier hs-var">EABaseReg</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rsp"><span class="hs-identifier hs-var">rsp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="GHC.CmmToAsm.X86.Regs.html#EAIndexNone"><span class="hs-identifier hs-var">EAIndexNone</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.X86.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004505"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="hs-comment">-- The register numbers must fit into 32 bits on x86, so that we can</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- use a Word32 to represent the set of free registers in the register</span><span>
</span><span id="line-201"></span><span class="hs-comment">-- allocator.</span><span>
</span><span id="line-202"></span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-type">firstxmm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span>
</span><span id="line-206"></span><span id="firstxmm"><span class="annot"><span class="annottext">firstxmm :: Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var hs-var">firstxmm</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span class="hs-comment">--  on 32bit platformOSs, only the first 8 XMM/YMM/ZMM registers are available</span><span>
</span><span id="line-209"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#lastxmm"><span class="hs-identifier hs-type">lastxmm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span>
</span><span id="line-210"></span><span id="lastxmm"><span class="annot"><span class="annottext">lastxmm :: Platform -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#lastxmm"><span class="hs-identifier hs-var hs-var">lastxmm</span></a></span></span><span> </span><span id="local-6989586621681004502"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004502"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-211"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#target32Bit"><span class="hs-identifier hs-var">target32Bit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004502"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span>  </span><span class="hs-comment">-- xmm0 - xmmm7</span><span>
</span><span id="line-212"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">15</span></span><span> </span><span class="hs-comment">-- xmm0 -xmm15</span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#lastint"><span class="hs-identifier hs-type">lastint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span>
</span><span id="line-215"></span><span id="lastint"><span class="annot"><span class="annottext">lastint :: Platform -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#lastint"><span class="hs-identifier hs-var hs-var">lastint</span></a></span></span><span> </span><span id="local-6989586621681004501"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004501"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-216"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#target32Bit"><span class="hs-identifier hs-var">target32Bit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004501"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span> </span><span class="hs-comment">-- not %r8..%r15</span><span>
</span><span id="line-217"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">15</span></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#intregnos"><span class="hs-identifier hs-type">intregnos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-220"></span><span id="intregnos"><span class="annot"><span class="annottext">intregnos :: Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#intregnos"><span class="hs-identifier hs-var hs-var">intregnos</span></a></span></span><span> </span><span id="local-6989586621681004499"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004499"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#lastint"><span class="hs-identifier hs-var">lastint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004499"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmmregnos"><span class="hs-identifier hs-type">xmmregnos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-225"></span><span id="xmmregnos"><span class="annot"><span class="annottext">xmmregnos :: Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmmregnos"><span class="hs-identifier hs-var hs-var">xmmregnos</span></a></span></span><span> </span><span id="local-6989586621681004497"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004497"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span>  </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#lastxmm"><span class="hs-identifier hs-var">lastxmm</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004497"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#floatregnos"><span class="hs-identifier hs-type">floatregnos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-228"></span><span id="floatregnos"><span class="annot"><span class="annottext">floatregnos :: Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#floatregnos"><span class="hs-identifier hs-var hs-var">floatregnos</span></a></span></span><span> </span><span id="local-6989586621681004495"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004495"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmmregnos"><span class="hs-identifier hs-var">xmmregnos</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004495"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span class="hs-comment">-- argRegs is the set of regs which are read for an n-argument call to C.</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- For archs which pass all args on the stack (x86), is empty.</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- Sparc passes up to the first 6 args in regs.</span><span>
</span><span id="line-233"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#argRegs"><span class="hs-identifier hs-type">argRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-234"></span><span id="argRegs"><span class="annot"><span class="annottext">argRegs :: Int -&gt; [Reg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#argRegs"><span class="hs-identifier hs-var hs-var">argRegs</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Reg]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;MachRegs.argRegs(x86): should not be used!&quot;</span></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span class="hs-comment">-- | The complete set of machine registers.</span><span>
</span><span id="line-237"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allMachRegNos"><span class="hs-identifier hs-type">allMachRegNos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-238"></span><span id="allMachRegNos"><span class="annot"><span class="annottext">allMachRegNos :: Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#allMachRegNos"><span class="hs-identifier hs-var hs-var">allMachRegNos</span></a></span></span><span> </span><span id="local-6989586621681004494"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004494"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#intregnos"><span class="hs-identifier hs-var">intregnos</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004494"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; [Int] -&gt; [Int]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#floatregnos"><span class="hs-identifier hs-var">floatregnos</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004494"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="hs-comment">-- | Take the class of a register.</span><span>
</span><span id="line-241"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#classOfRealReg"><span class="hs-pragma hs-type">classOfRealReg</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-242"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#classOfRealReg"><span class="hs-identifier hs-type">classOfRealReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span>
</span><span id="line-243"></span><span class="hs-comment">-- On x86, we might want to have an 8-bit RegClass, which would</span><span>
</span><span id="line-244"></span><span class="hs-comment">-- contain just regs 1-4 (the others don't have 8-bit versions).</span><span>
</span><span id="line-245"></span><span class="hs-comment">-- However, we can get away without this at the moment because the</span><span>
</span><span id="line-246"></span><span class="hs-comment">-- only allocatable integer regs are also 8-bit compatible (1, 3, 4).</span><span>
</span><span id="line-247"></span><span id="classOfRealReg"><span class="annot"><span class="annottext">classOfRealReg :: Platform -&gt; RealReg -&gt; RegClass
</span><a href="GHC.CmmToAsm.X86.Regs.html#classOfRealReg"><span class="hs-identifier hs-var hs-var">classOfRealReg</span></a></span></span><span> </span><span id="local-6989586621681004493"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004493"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681004492"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681004492"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-248"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681004492"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-249"></span><span>        </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621681004491"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004491"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-250"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004491"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#lastint"><span class="hs-identifier hs-var">lastint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004493"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-251"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004491"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#lastxmm"><span class="hs-identifier hs-var">lastxmm</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004493"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>
</span><span id="line-252"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RegClass
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;X86.Reg.classOfRealReg registerSingle too high&quot;</span></span><span>
</span><span id="line-253"></span><span>        </span><span class="annot"><span class="annottext">RealReg
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RegClass
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;X86.Regs.classOfRealReg: RegPairs on this arch&quot;</span></span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span class="hs-comment">-- | Get the name of the register with this number.</span><span>
</span><span id="line-256"></span><span class="hs-comment">-- NOTE: fixme, we dont track which &quot;way&quot; the XMM registers are used</span><span>
</span><span id="line-257"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#showReg"><span class="hs-identifier hs-type">showReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-258"></span><span id="showReg"><span class="annot"><span class="annottext">showReg :: Platform -&gt; Int -&gt; String
</span><a href="GHC.CmmToAsm.X86.Regs.html#showReg"><span class="hs-identifier hs-var hs-var">showReg</span></a></span></span><span> </span><span id="local-6989586621681004489"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004489"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681004488"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-259"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#lastxmm"><span class="hs-identifier hs-var">lastxmm</span></a></span><span>  </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004489"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%xmm&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-260"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span>   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%r&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-261"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Array Int String
</span><a href="GHC.CmmToAsm.X86.Regs.html#regNames"><span class="hs-identifier hs-var">regNames</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004489"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Array Int String -&gt; Int -&gt; String
forall i e. Ix i =&gt; Array i e -&gt; i -&gt; e
</span><a href="../../base/src/GHC.Arr.html#%21"><span class="hs-operator hs-var">A.!</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004488"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#regNames"><span class="hs-identifier hs-type">regNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Arr.html#Array"><span class="hs-identifier hs-type">A.Array</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-264"></span><span id="regNames"><span class="annot"><span class="annottext">regNames :: Platform -&gt; Array Int String
</span><a href="GHC.CmmToAsm.X86.Regs.html#regNames"><span class="hs-identifier hs-var hs-var">regNames</span></a></span></span><span> </span><span id="local-6989586621681004483"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004483"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-265"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#target32Bit"><span class="hs-identifier hs-var">target32Bit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004483"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-266"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [String] -&gt; Array Int String
forall i e. Ix i =&gt; (i, i) -&gt; [e] -&gt; Array i e
</span><a href="../../base/src/GHC.Arr.html#listArray"><span class="hs-identifier hs-var">A.listArray</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%eax&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%ebx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%ecx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%edx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%esi&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%edi&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%ebp&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%esp&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-267"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [String] -&gt; Array Int String
forall i e. Ix i =&gt; (i, i) -&gt; [e] -&gt; Array i e
</span><a href="../../base/src/GHC.Arr.html#listArray"><span class="hs-identifier hs-var">A.listArray</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rax&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rbx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rcx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rdx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rsi&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rdi&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rbp&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%rsp&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="hs-comment">-- machine specific ------------------------------------------------------------</span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span class="hs-comment">{-
Intel x86 architecture:
- All registers except 7 (esp) are available for use.
- Only ebx, esi, edi and esp are available across a C call (they are callee-saves).
- Registers 0-7 have 16-bit counterparts (ax, bx etc.)
- Registers 0-3 have 8 bit counterparts (ah, bh etc.)

The fp registers are all Double registers; we don't have any RcFloat class
regs.  @regClass@ barfs if you give it a VirtualRegF, and mkVReg above should
never generate them.

TODO: cleanup modelling float vs double registers and how they are the same class.
-}</span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#eax"><span class="hs-identifier hs-type">eax</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ebx"><span class="hs-identifier hs-type">ebx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ecx"><span class="hs-identifier hs-type">ecx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#edx"><span class="hs-identifier hs-type">edx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#esp"><span class="hs-identifier hs-type">esp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ebp"><span class="hs-identifier hs-type">ebp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#esi"><span class="hs-identifier hs-type">esi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#edi"><span class="hs-identifier hs-type">edi</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span id="eax"><span class="annot"><span class="annottext">eax :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#eax"><span class="hs-identifier hs-var hs-var">eax</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-292"></span><span id="ebx"><span class="annot"><span class="annottext">ebx :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#ebx"><span class="hs-identifier hs-var hs-var">ebx</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-293"></span><span id="ecx"><span class="annot"><span class="annottext">ecx :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#ecx"><span class="hs-identifier hs-var hs-var">ecx</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-294"></span><span id="edx"><span class="annot"><span class="annottext">edx :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#edx"><span class="hs-identifier hs-var hs-var">edx</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-295"></span><span id="esi"><span class="annot"><span class="annottext">esi :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#esi"><span class="hs-identifier hs-var hs-var">esi</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span>
</span><span id="line-296"></span><span id="edi"><span class="annot"><span class="annottext">edi :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#edi"><span class="hs-identifier hs-var hs-var">edi</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span>
</span><span id="line-297"></span><span id="ebp"><span class="annot"><span class="annottext">ebp :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#ebp"><span class="hs-identifier hs-var hs-var">ebp</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span>
</span><span id="line-298"></span><span id="esp"><span class="annot"><span class="annottext">esp :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#esp"><span class="hs-identifier hs-var hs-var">esp</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span>
</span><span id="line-299"></span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="hs-comment">{-
AMD x86_64 architecture:
- All 16 integer registers are addressable as 8, 16, 32 and 64-bit values:

  8     16    32    64
  ---------------------
  al    ax    eax   rax
  bl    bx    ebx   rbx
  cl    cx    ecx   rcx
  dl    dx    edx   rdx
  sil   si    esi   rsi
  dil   si    edi   rdi
  bpl   bp    ebp   rbp
  spl   sp    esp   rsp
  r10b  r10w  r10d  r10
  r11b  r11w  r11d  r11
  r12b  r12w  r12d  r12
  r13b  r13w  r13d  r13
  r14b  r14w  r14d  r14
  r15b  r15w  r15d  r15
-}</span><span>
</span><span id="line-324"></span><span>
</span><span id="line-325"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rax"><span class="hs-identifier hs-type">rax</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rbx"><span class="hs-identifier hs-type">rbx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier hs-type">rcx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier hs-type">rdx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rsp"><span class="hs-identifier hs-type">rsp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rbp"><span class="hs-identifier hs-type">rbp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rsi"><span class="hs-identifier hs-type">rsi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#rdi"><span class="hs-identifier hs-type">rdi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-326"></span><span>  </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r8"><span class="hs-identifier hs-type">r8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r9"><span class="hs-identifier hs-type">r9</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r10"><span class="hs-identifier hs-type">r10</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r11"><span class="hs-identifier hs-type">r11</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r12"><span class="hs-identifier hs-type">r12</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r13"><span class="hs-identifier hs-type">r13</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r14"><span class="hs-identifier hs-type">r14</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#r15"><span class="hs-identifier hs-type">r15</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-327"></span><span>  </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm0"><span class="hs-identifier hs-type">xmm0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm1"><span class="hs-identifier hs-type">xmm1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm2"><span class="hs-identifier hs-type">xmm2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm3"><span class="hs-identifier hs-type">xmm3</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm4"><span class="hs-identifier hs-type">xmm4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm5"><span class="hs-identifier hs-type">xmm5</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm6"><span class="hs-identifier hs-type">xmm6</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm7"><span class="hs-identifier hs-type">xmm7</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-328"></span><span>  </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm8"><span class="hs-identifier hs-type">xmm8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm9"><span class="hs-identifier hs-type">xmm9</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm10"><span class="hs-identifier hs-type">xmm10</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm11"><span class="hs-identifier hs-type">xmm11</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm12"><span class="hs-identifier hs-type">xmm12</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm13"><span class="hs-identifier hs-type">xmm13</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm14"><span class="hs-identifier hs-type">xmm14</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm15"><span class="hs-identifier hs-type">xmm15</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span id="rax"><span class="annot"><span class="annottext">rax :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rax"><span class="hs-identifier hs-var hs-var">rax</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-331"></span><span id="rbx"><span class="annot"><span class="annottext">rbx :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rbx"><span class="hs-identifier hs-var hs-var">rbx</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-332"></span><span id="rcx"><span class="annot"><span class="annottext">rcx :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier hs-var hs-var">rcx</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-333"></span><span id="rdx"><span class="annot"><span class="annottext">rdx :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier hs-var hs-var">rdx</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-334"></span><span id="rsi"><span class="annot"><span class="annottext">rsi :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rsi"><span class="hs-identifier hs-var hs-var">rsi</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span>
</span><span id="line-335"></span><span id="rdi"><span class="annot"><span class="annottext">rdi :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdi"><span class="hs-identifier hs-var hs-var">rdi</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span>
</span><span id="line-336"></span><span id="rbp"><span class="annot"><span class="annottext">rbp :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rbp"><span class="hs-identifier hs-var hs-var">rbp</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span>
</span><span id="line-337"></span><span id="rsp"><span class="annot"><span class="annottext">rsp :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rsp"><span class="hs-identifier hs-var hs-var">rsp</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span>
</span><span id="line-338"></span><span id="r8"><span class="annot"><span class="annottext">r8 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r8"><span class="hs-identifier hs-var hs-var">r8</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span>
</span><span id="line-339"></span><span id="r9"><span class="annot"><span class="annottext">r9 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r9"><span class="hs-identifier hs-var hs-var">r9</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">9</span></span><span>
</span><span id="line-340"></span><span id="r10"><span class="annot"><span class="annottext">r10 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r10"><span class="hs-identifier hs-var hs-var">r10</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-341"></span><span id="r11"><span class="annot"><span class="annottext">r11 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r11"><span class="hs-identifier hs-var hs-var">r11</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">11</span></span><span>
</span><span id="line-342"></span><span id="r12"><span class="annot"><span class="annottext">r12 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r12"><span class="hs-identifier hs-var hs-var">r12</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span>
</span><span id="line-343"></span><span id="r13"><span class="annot"><span class="annottext">r13 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r13"><span class="hs-identifier hs-var hs-var">r13</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">13</span></span><span>
</span><span id="line-344"></span><span id="r14"><span class="annot"><span class="annottext">r14 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r14"><span class="hs-identifier hs-var hs-var">r14</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">14</span></span><span>
</span><span id="line-345"></span><span id="r15"><span class="annot"><span class="annottext">r15 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r15"><span class="hs-identifier hs-var hs-var">r15</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">15</span></span><span>
</span><span id="line-346"></span><span id="xmm0"><span class="annot"><span class="annottext">xmm0 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm0"><span class="hs-identifier hs-var hs-var">xmm0</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span>
</span><span id="line-347"></span><span id="xmm1"><span class="annot"><span class="annottext">xmm1 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm1"><span class="hs-identifier hs-var hs-var">xmm1</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">17</span></span><span>
</span><span id="line-348"></span><span id="xmm2"><span class="annot"><span class="annottext">xmm2 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm2"><span class="hs-identifier hs-var hs-var">xmm2</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">18</span></span><span>
</span><span id="line-349"></span><span id="xmm3"><span class="annot"><span class="annottext">xmm3 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm3"><span class="hs-identifier hs-var hs-var">xmm3</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">19</span></span><span>
</span><span id="line-350"></span><span id="xmm4"><span class="annot"><span class="annottext">xmm4 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm4"><span class="hs-identifier hs-var hs-var">xmm4</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">20</span></span><span>
</span><span id="line-351"></span><span id="xmm5"><span class="annot"><span class="annottext">xmm5 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm5"><span class="hs-identifier hs-var hs-var">xmm5</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">21</span></span><span>
</span><span id="line-352"></span><span id="xmm6"><span class="annot"><span class="annottext">xmm6 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm6"><span class="hs-identifier hs-var hs-var">xmm6</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">22</span></span><span>
</span><span id="line-353"></span><span id="xmm7"><span class="annot"><span class="annottext">xmm7 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm7"><span class="hs-identifier hs-var hs-var">xmm7</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">23</span></span><span>
</span><span id="line-354"></span><span id="xmm8"><span class="annot"><span class="annottext">xmm8 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm8"><span class="hs-identifier hs-var hs-var">xmm8</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">24</span></span><span>
</span><span id="line-355"></span><span id="xmm9"><span class="annot"><span class="annottext">xmm9 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm9"><span class="hs-identifier hs-var hs-var">xmm9</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">25</span></span><span>
</span><span id="line-356"></span><span id="xmm10"><span class="annot"><span class="annottext">xmm10 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm10"><span class="hs-identifier hs-var hs-var">xmm10</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">26</span></span><span>
</span><span id="line-357"></span><span id="xmm11"><span class="annot"><span class="annottext">xmm11 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm11"><span class="hs-identifier hs-var hs-var">xmm11</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">27</span></span><span>
</span><span id="line-358"></span><span id="xmm12"><span class="annot"><span class="annottext">xmm12 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm12"><span class="hs-identifier hs-var hs-var">xmm12</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">28</span></span><span>
</span><span id="line-359"></span><span id="xmm13"><span class="annot"><span class="annottext">xmm13 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm13"><span class="hs-identifier hs-var hs-var">xmm13</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">29</span></span><span>
</span><span id="line-360"></span><span id="xmm14"><span class="annot"><span class="annottext">xmm14 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm14"><span class="hs-identifier hs-var hs-var">xmm14</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">30</span></span><span>
</span><span id="line-361"></span><span id="xmm15"><span class="annot"><span class="annottext">xmm15 :: Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm15"><span class="hs-identifier hs-var hs-var">xmm15</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">31</span></span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#ripRel"><span class="hs-identifier hs-type">ripRel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#Displacement"><span class="hs-identifier hs-type">Displacement</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span>
</span><span id="line-364"></span><span id="ripRel"><span class="annot"><span class="annottext">ripRel :: Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#ripRel"><span class="hs-identifier hs-var hs-var">ripRel</span></a></span></span><span> </span><span id="local-6989586621681004480"><span class="annot"><span class="annottext">Imm
</span><a href="#local-6989586621681004480"><span class="hs-identifier hs-var">imm</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EABase -&gt; EAIndex -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.X86.Regs.html#AddrBaseIndex"><span class="hs-identifier hs-var">AddrBaseIndex</span></a></span><span> </span><span class="annot"><span class="annottext">EABase
</span><a href="GHC.CmmToAsm.X86.Regs.html#EABaseRip"><span class="hs-identifier hs-var">EABaseRip</span></a></span><span> </span><span class="annot"><span class="annottext">EAIndex
</span><a href="GHC.CmmToAsm.X86.Regs.html#EAIndexNone"><span class="hs-identifier hs-var">EAIndexNone</span></a></span><span> </span><span class="annot"><span class="annottext">Imm
</span><a href="#local-6989586621681004480"><span class="hs-identifier hs-var">imm</span></a></span><span>
</span><span id="line-365"></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span> </span><span class="hs-comment">-- so we can re-use some x86 code:</span><span>
</span><span id="line-368"></span><span class="hs-comment">{-
eax = rax
ebx = rbx
ecx = rcx
edx = rdx
esi = rsi
edi = rdi
ebp = rbp
esp = rsp
-}</span><span>
</span><span id="line-378"></span><span>
</span><span id="line-379"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#xmm"><span class="hs-identifier hs-type">xmm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-380"></span><span id="xmm"><span class="annot"><span class="annottext">xmm :: Int -&gt; Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm"><span class="hs-identifier hs-var hs-var">xmm</span></a></span></span><span> </span><span id="local-6989586621681004479"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004479"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004479"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="hs-comment">-- | these are the regs which we cannot assume stay alive over a C call.</span><span>
</span><span id="line-386"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#callClobberedRegs"><span class="hs-identifier hs-type">callClobberedRegs</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-387"></span><span class="hs-comment">-- caller-saves registers</span><span>
</span><span id="line-388"></span><span id="callClobberedRegs"><span class="annot"><span class="annottext">callClobberedRegs :: Platform -&gt; [Reg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#callClobberedRegs"><span class="hs-identifier hs-var hs-var">callClobberedRegs</span></a></span></span><span> </span><span id="local-6989586621681004478"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004478"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-389"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#target32Bit"><span class="hs-identifier hs-var">target32Bit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004478"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#eax"><span class="hs-identifier hs-var">eax</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#ecx"><span class="hs-identifier hs-var">ecx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#edx"><span class="hs-identifier hs-var">edx</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; [Reg] -&gt; [Reg]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#floatregnos"><span class="hs-identifier hs-var">floatregnos</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004478"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-390"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004478"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; OS -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span>
</span><span id="line-391"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rax"><span class="hs-identifier hs-var">rax</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier hs-var">rcx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier hs-var">rdx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r8"><span class="hs-identifier hs-var">r8</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r9"><span class="hs-identifier hs-var">r9</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r10"><span class="hs-identifier hs-var">r10</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r11"><span class="hs-identifier hs-var">r11</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-392"></span><span>   </span><span class="hs-comment">-- Only xmm0-5 are caller-saves registers on 64bit windows.</span><span>
</span><span id="line-393"></span><span>   </span><span class="hs-comment">-- ( https://docs.microsoft.com/en-us/cpp/build/register-usage )</span><span>
</span><span id="line-394"></span><span>   </span><span class="hs-comment">-- For details check the Win64 ABI.</span><span>
</span><span id="line-395"></span><span>   </span><span class="annot"><span class="annottext">[Reg] -&gt; [Reg] -&gt; [Reg]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#xmm"><span class="hs-identifier hs-var">xmm</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>  </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span class="hs-special">]</span><span>
</span><span id="line-396"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-397"></span><span>    </span><span class="hs-comment">-- all xmm regs are caller-saves</span><span>
</span><span id="line-398"></span><span>    </span><span class="hs-comment">-- caller-saves registers</span><span>
</span><span id="line-399"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rax"><span class="hs-identifier hs-var">rax</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier hs-var">rcx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier hs-var">rdx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rsi"><span class="hs-identifier hs-var">rsi</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdi"><span class="hs-identifier hs-var">rdi</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r8"><span class="hs-identifier hs-var">r8</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r9"><span class="hs-identifier hs-var">r9</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r10"><span class="hs-identifier hs-var">r10</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r11"><span class="hs-identifier hs-var">r11</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-400"></span><span>   </span><span class="annot"><span class="annottext">[Reg] -&gt; [Reg] -&gt; [Reg]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#floatregnos"><span class="hs-identifier hs-var">floatregnos</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004478"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-401"></span><span>
</span><span id="line-402"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allArgRegs"><span class="hs-identifier hs-type">allArgRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-403"></span><span id="allArgRegs"><span class="annot"><span class="annottext">allArgRegs :: Platform -&gt; [(Reg, Reg)]
</span><a href="GHC.CmmToAsm.X86.Regs.html#allArgRegs"><span class="hs-identifier hs-var hs-var">allArgRegs</span></a></span></span><span> </span><span id="local-6989586621681004475"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004475"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-404"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004475"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; OS -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; [Reg] -&gt; [(Reg, Reg)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier hs-var">rcx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier hs-var">rdx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r8"><span class="hs-identifier hs-var">r8</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r9"><span class="hs-identifier hs-var">r9</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-405"></span><span>                                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span> </span><span class="hs-glyph">..</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-406"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [(Reg, Reg)]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;X86.Regs.allArgRegs: not defined for this arch&quot;</span></span><span>
</span><span id="line-407"></span><span>
</span><span id="line-408"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allIntArgRegs"><span class="hs-identifier hs-type">allIntArgRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-409"></span><span id="allIntArgRegs"><span class="annot"><span class="annottext">allIntArgRegs :: Platform -&gt; [Reg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#allIntArgRegs"><span class="hs-identifier hs-var hs-var">allIntArgRegs</span></a></span></span><span> </span><span id="local-6989586621681004474"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004474"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-410"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004474"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; OS -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#target32Bit"><span class="hs-identifier hs-var">target32Bit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004474"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-411"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Reg]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;X86.Regs.allIntArgRegs: not defined for this platform&quot;</span></span><span>
</span><span id="line-412"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdi"><span class="hs-identifier hs-var">rdi</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rsi"><span class="hs-identifier hs-var">rsi</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier hs-var">rdx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier hs-var">rcx</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r8"><span class="hs-identifier hs-var">r8</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#r9"><span class="hs-identifier hs-var">r9</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-413"></span><span>
</span><span id="line-414"></span><span>
</span><span id="line-415"></span><span class="hs-comment">-- | on 64bit platforms we pass the first 8 float/double arguments</span><span>
</span><span id="line-416"></span><span class="hs-comment">-- in the xmm registers.</span><span>
</span><span id="line-417"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allFPArgRegs"><span class="hs-identifier hs-type">allFPArgRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-418"></span><span id="allFPArgRegs"><span class="annot"><span class="annottext">allFPArgRegs :: Platform -&gt; [Reg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#allFPArgRegs"><span class="hs-identifier hs-var hs-var">allFPArgRegs</span></a></span></span><span> </span><span id="local-6989586621681004472"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004472"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-419"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004472"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; OS -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span>
</span><span id="line-420"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Reg]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;X86.Regs.allFPArgRegs: not defined for this platform&quot;</span></span><span>
</span><span id="line-421"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.CmmToAsm.X86.Regs.html#firstxmm"><span class="hs-identifier hs-var">firstxmm</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-422"></span><span>
</span><span id="line-423"></span><span>
</span><span id="line-424"></span><span class="hs-comment">-- Machine registers which might be clobbered by instructions that</span><span>
</span><span id="line-425"></span><span class="hs-comment">-- generate results into fixed registers, or need arguments in a fixed</span><span>
</span><span id="line-426"></span><span class="hs-comment">-- register.</span><span>
</span><span id="line-427"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#instrClobberedRegs"><span class="hs-identifier hs-type">instrClobberedRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-428"></span><span id="instrClobberedRegs"><span class="annot"><span class="annottext">instrClobberedRegs :: Platform -&gt; [Reg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#instrClobberedRegs"><span class="hs-identifier hs-var hs-var">instrClobberedRegs</span></a></span></span><span> </span><span id="local-6989586621681004471"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004471"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-429"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#target32Bit"><span class="hs-identifier hs-var">target32Bit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004471"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#eax"><span class="hs-identifier hs-var">eax</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#ecx"><span class="hs-identifier hs-var">ecx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#edx"><span class="hs-identifier hs-var">edx</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-430"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rax"><span class="hs-identifier hs-var">rax</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rcx"><span class="hs-identifier hs-var">rcx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.X86.Regs.html#rdx"><span class="hs-identifier hs-var">rdx</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span class="hs-comment">--</span><span>
</span><span id="line-433"></span><span>
</span><span id="line-434"></span><span class="hs-comment">-- allocatableRegs is allMachRegNos with the fixed-use regs removed.</span><span>
</span><span id="line-435"></span><span class="hs-comment">-- i.e., these are the regs for which we are prepared to allow the</span><span>
</span><span id="line-436"></span><span class="hs-comment">-- register allocator to attempt to map VRegs to.</span><span>
</span><span id="line-437"></span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html#allocatableRegs"><span class="hs-identifier hs-type">allocatableRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-438"></span><span id="allocatableRegs"><span class="annot"><span class="annottext">allocatableRegs :: Platform -&gt; [RealReg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#allocatableRegs"><span class="hs-identifier hs-var hs-var">allocatableRegs</span></a></span></span><span> </span><span id="local-6989586621681004470"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004470"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-439"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681004469"><span class="annot"><span class="annottext">isFree :: Int -&gt; Bool
</span><a href="#local-6989586621681004469"><span class="hs-identifier hs-var hs-var">isFree</span></a></span></span><span> </span><span id="local-6989586621681004468"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004468"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; Bool
</span><a href="GHC.Platform.Regs.html#freeReg"><span class="hs-identifier hs-var">freeReg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004470"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681004468"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-440"></span><span>     </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">(Int -&gt; RealReg) -&gt; [Int] -&gt; [RealReg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; RealReg
</span><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-var">RealRegSingle</span></a></span><span> </span><span class="annot"><span class="annottext">([Int] -&gt; [RealReg]) -&gt; [Int] -&gt; [RealReg]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Bool) -&gt; [Int] -&gt; [Int]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool
</span><a href="#local-6989586621681004469"><span class="hs-identifier hs-var">isFree</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; [Int]
</span><a href="GHC.CmmToAsm.X86.Regs.html#allMachRegNos"><span class="hs-identifier hs-var">allMachRegNos</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681004470"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span></pre></body></html>